#if !defined(EA_27604D81_DBB4_407e_A35F_820F0086F1C6__INCLUDED_)
#define EA_27604D81_DBB4_407e_A35F_820F0086F1C6__INCLUDED_

#include "Type.h"
#include <string>
#include <vector>
#include <map>
#include <sstream>
using namespace std;

class Client {
public:
	Client() {
		/*stringstream ss;
		 lastID++;
		 ss<<"C";
		 ss << (int) lastID;
		 clientID=ss.str();*/
	}

	Client(string _name, string _address, string _phoneNumber, string _email,
			string _password) :
			clientName(_name), address(_address), phoneNumber(_phoneNumber),
			email(_email), password(_password) {
		stringstream ss;
		lastID++;
		ss << "C";
		ss << (int) lastID;
		clientID = ss.str();
	}
	virtual ~Client() {
	}

	/** Obtains the client's address.
	 * @return the address of the client */
	string getAddress() const {
		return address;
	}
	/** Obtains the client's ID.
	 * @return the ID of the client */
	string getID() const {
		return clientID;
	}
	/** Obtains the client's e-mail.
	 * @return the e-mail of the client */
	string getEmail() const {
		return email;
	}
	/** Obtains the client's password.
	 * @return the password of the client */
	string getPassword() const {
		return password;
	}
	/** Obtains the client's name.
	 * @return the name of the client */
	string getName() const {
		return clientName;
	}
	/** Obtains the client's phone number.
	 * @return the phone number of the client */
	string getPhoneNumber() const {
		return phoneNumber;
	}
	/** Obtains the client's preferences.
	 * @return a vector with the types that are the preferences of the client */
	vector<Type> getPreferences() const {
		return preferences;
	}

	/** Sets address equal to _address */
	void setAddress(string _address) {
		address = _address;
	}

	/** Sets password equal to _password */
	void setPassword(string _password) {
		password = _password;
	}

	/** Sets clientID equal to _ID */
	void setID(unsigned int _ID) {
		clientID = _ID;
	}

	/** Sets email equal to _email */
	void setEmail(string _email) {
		email = _email;
	}

	/** Sets clientName equal to _name */
	void setName(string _name) {
		clientName = _name;
	}

	/** Sets phoneNumber equal to _phoneNumber */
	void setPhoneNumber(string _phoneNumber) {
		phoneNumber = _phoneNumber;
	}

	/** adds a new preference to the client's preferences */
	void addPreference(Type _type);
	
	/** deletes a preference from the client's preferences */
	void deletePreference(Type _type);
	
	/** shows the preferences of the client */
	void showPreferences();
	
	/** @return true if the preference given already exists in the preferences of the client */
	bool preferenceExists(Type _type);

	/** shows the information about the client */
	void showClient();

	/** operator == overload to compare the client with client2's */
	bool operator==(const Client& client2) const;

private:
	string clientID;
	string clientName;
	string address;
	string phoneNumber;
	string email;
	string password;
	//map<Type, int> defaultpreferences;
	vector<Type> preferences;

	static unsigned int lastID; //to generate IDs, it increments the lastID created each time a client is created

};
#endif // !defined(EA_27604D81_DBB4_407e_A35F_820F0086F1C6__INCLUDED_)
